<?php 
/**
*	接口
*/
class indexClassAction extends apiAction
{

	public function exitAction()
	{
		m('login')->exitlogin();
		return returnsuccess();
	}
	
	public function dataAction()
	{
		
		$barr['newfile'] = $this->newfile_data();
		
		return returnsuccess($barr);
	}
	
	//最新文件
	public function newfile_data()
	{
		$dbs   = m('word');
		$crows = $dbs->getworc($this->adminrs);
		$fqids = '0';
		foreach($crows as $k=>$rs){
			$fqids .= ','.$rs['id'].'';
		}
		return $dbs->getall('`fqid` in('.$fqids.') and `type`=0','filenum,fileext,filename,thumbpath,optdt', 'optdt desc limit 5');
	}
}